﻿using dnAnalytics.Math;
using NUnit.Framework;

namespace dnAnalytics.Tests.Math
{
    [TestFixture]
    public class Complex32Math_Plus32Test
    {
        [Test]
        public void Plus()
        {
            Complex32 a = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            Complex32 b = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.38418579101561997074e-7f, 2.38418579101561997074e-7f), 15);;
            a = new Complex32(0.0f, 1.19209289550780998537e-7f);
            b = new Complex32(0.0f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(0.0f, -1.19209289550780998537e-7f);
            b = new Complex32(0.0f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 4.99999880790710449219e-1f), 15);;
            a = new Complex32(0.0f, 5.0e-1f);
            b = new Complex32(0.0f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(0.0f, -5.0e-1f);
            b = new Complex32(0.0f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 5.0e-1f), 15);;
            a = new Complex32(0.0f, 1.0f);
            b = new Complex32(0.0f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(0.0f, -1.0f);
            b = new Complex32(0.0f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.0f), 15);;
            a = new Complex32(0.0f, 2.0f);
            b = new Complex32(0.0f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(0.0f, -2.0f);
            b = new Complex32(0.0f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 8.388606e6f), 15);;
            a = new Complex32(0.0f, 8.388608e6f);
            b = new Complex32(0.0f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(0.0f, -8.388608e6f);
            b = new Complex32(1.19209289550780998537e-7f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.19209289550780998537e-7f, -8.388608e6f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, 0.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, 0.0f);
            b = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.19209289550780998537e-7f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            b = new Complex32(1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            b = new Complex32(-1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            b = new Complex32(-1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            b = new Complex32(1.19209289550780998537e-7f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 4.99999880790710449219e-1f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, 5.0e-1f);
            b = new Complex32(1.19209289550780998537e-7f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, -5.0e-1f);
            b = new Complex32(-1.19209289550780998537e-7f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, 5.0e-1f);
            b = new Complex32(-1.19209289550780998537e-7f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, -5.0e-1f);
            b = new Complex32(1.19209289550780998537e-7f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 5.0e-1f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, 1.0f);
            b = new Complex32(1.19209289550780998537e-7f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, -1.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, 1.0f);
            b = new Complex32(-1.19209289550780998537e-7f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, -1.0f);
            b = new Complex32(1.19209289550780998537e-7f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.0f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, 2.0f);
            b = new Complex32(1.19209289550780998537e-7f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, -2.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, 2.0f);
            b = new Complex32(-1.19209289550780998537e-7f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, -2.0f);
            b = new Complex32(1.19209289550780998537e-7f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 8.388606e6f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, 8.388608e6f);
            b = new Complex32(1.19209289550780998537e-7f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(1.19209289550780998537e-7f, -8.388608e6f);
            b = new Complex32(-1.19209289550780998537e-7f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, 8.388608e6f);
            b = new Complex32(-1.19209289550780998537e-7f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.38418579101561997074e-7f, 0.0f), 15);;
            a = new Complex32(-1.19209289550780998537e-7f, -8.388608e6f);
            b = new Complex32(5.0e-1f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(4.99999880790710449219e-1f, -8.388608e6f), 15);;
            a = new Complex32(5.0e-1f, 0.0f);
            b = new Complex32(-5.0e-1f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, 0.0f);
            b = new Complex32(5.0e-1f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.19209289550780998537e-7f), 15);;
            a = new Complex32(5.0e-1f, 1.19209289550780998537e-7f);
            b = new Complex32(5.0e-1f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.0f, 0.0f), 15);;
            a = new Complex32(5.0e-1f, -1.19209289550780998537e-7f);
            b = new Complex32(-5.0e-1f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, 1.19209289550780998537e-7f);
            b = new Complex32(-5.0e-1f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, -1.19209289550780998537e-7f);
            b = new Complex32(5.0e-1f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 4.99999880790710449219e-1f), 15);;
            a = new Complex32(5.0e-1f, 5.0e-1f);
            b = new Complex32(5.0e-1f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.0f, 0.0f), 15);;
            a = new Complex32(5.0e-1f, -5.0e-1f);
            b = new Complex32(-5.0e-1f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, 5.0e-1f);
            b = new Complex32(-5.0e-1f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, -5.0e-1f);
            b = new Complex32(5.0e-1f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 5.0e-1f), 15);;
            a = new Complex32(5.0e-1f, 1.0f);
            b = new Complex32(5.0e-1f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.0f, 0.0f), 15);;
            a = new Complex32(5.0e-1f, -1.0f);
            b = new Complex32(-5.0e-1f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, 1.0f);
            b = new Complex32(-5.0e-1f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, -1.0f);
            b = new Complex32(5.0e-1f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.0f), 15);;
            a = new Complex32(5.0e-1f, 2.0f);
            b = new Complex32(5.0e-1f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.0f, 0.0f), 15);;
            a = new Complex32(5.0e-1f, -2.0f);
            b = new Complex32(-5.0e-1f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, 2.0f);
            b = new Complex32(-5.0e-1f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, -2.0f);
            b = new Complex32(5.0e-1f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 8.388606e6f), 15);;
            a = new Complex32(5.0e-1f, 8.388608e6f);
            b = new Complex32(5.0e-1f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.0f, 0.0f), 15);;
            a = new Complex32(5.0e-1f, -8.388608e6f);
            b = new Complex32(-5.0e-1f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, 8.388608e6f);
            b = new Complex32(-5.0e-1f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.0f, 0.0f), 15);;
            a = new Complex32(-5.0e-1f, -8.388608e6f);
            b = new Complex32(1.0f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(5.0e-1f, -8.388608e6f), 15);;
            a = new Complex32(1.0f, 0.0f);
            b = new Complex32(-1.0f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, 0.0f);
            b = new Complex32(1.0f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.19209289550780998537e-7f), 15);;
            a = new Complex32(1.0f, 1.19209289550780998537e-7f);
            b = new Complex32(1.0f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.0f, 0.0f), 15);;
            a = new Complex32(1.0f, -1.19209289550780998537e-7f);
            b = new Complex32(-1.0f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, 1.19209289550780998537e-7f);
            b = new Complex32(-1.0f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, -1.19209289550780998537e-7f);
            b = new Complex32(1.0f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 4.99999880790710449219e-1f), 15);;
            a = new Complex32(1.0f, 5.0e-1f);
            b = new Complex32(1.0f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.0f, 0.0f), 15);;
            a = new Complex32(1.0f, -5.0e-1f);
            b = new Complex32(-1.0f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, 5.0e-1f);
            b = new Complex32(-1.0f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, -5.0e-1f);
            b = new Complex32(1.0f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 5.0e-1f), 15);;
            a = new Complex32(1.0f, 1.0f);
            b = new Complex32(1.0f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.0f, 0.0f), 15);;
            a = new Complex32(1.0f, -1.0f);
            b = new Complex32(-1.0f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, 1.0f);
            b = new Complex32(-1.0f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, -1.0f);
            b = new Complex32(1.0f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.0f), 15);;
            a = new Complex32(1.0f, 2.0f);
            b = new Complex32(1.0f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.0f, 0.0f), 15);;
            a = new Complex32(1.0f, -2.0f);
            b = new Complex32(-1.0f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, 2.0f);
            b = new Complex32(-1.0f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, -2.0f);
            b = new Complex32(1.0f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 8.388606e6f), 15);;
            a = new Complex32(1.0f, 8.388608e6f);
            b = new Complex32(1.0f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(2.0f, 0.0f), 15);;
            a = new Complex32(1.0f, -8.388608e6f);
            b = new Complex32(-1.0f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, 8.388608e6f);
            b = new Complex32(-1.0f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-2.0f, 0.0f), 15);;
            a = new Complex32(-1.0f, -8.388608e6f);
            b = new Complex32(2.0f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.0f, -8.388608e6f), 15);;
            a = new Complex32(2.0f, 0.0f);
            b = new Complex32(-2.0f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, 0.0f);
            b = new Complex32(2.0f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.19209289550780998537e-7f), 15);;
            a = new Complex32(2.0f, 1.19209289550780998537e-7f);
            b = new Complex32(2.0f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(4.0f, 0.0f), 15);;
            a = new Complex32(2.0f, -1.19209289550780998537e-7f);
            b = new Complex32(-2.0f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, 1.19209289550780998537e-7f);
            b = new Complex32(-2.0f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-4.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, -1.19209289550780998537e-7f);
            b = new Complex32(2.0f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 4.99999880790710449219e-1f), 15);;
            a = new Complex32(2.0f, 5.0e-1f);
            b = new Complex32(2.0f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(4.0f, 0.0f), 15);;
            a = new Complex32(2.0f, -5.0e-1f);
            b = new Complex32(-2.0f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, 5.0e-1f);
            b = new Complex32(-2.0f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-4.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, -5.0e-1f);
            b = new Complex32(2.0f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 5.0e-1f), 15);;
            a = new Complex32(2.0f, 1.0f);
            b = new Complex32(2.0f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(4.0f, 0.0f), 15);;
            a = new Complex32(2.0f, -1.0f);
            b = new Complex32(-2.0f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, 1.0f);
            b = new Complex32(-2.0f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-4.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, -1.0f);
            b = new Complex32(2.0f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.0f), 15);;
            a = new Complex32(2.0f, 2.0f);
            b = new Complex32(2.0f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(4.0f, 0.0f), 15);;
            a = new Complex32(2.0f, -2.0f);
            b = new Complex32(-2.0f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, 2.0f);
            b = new Complex32(-2.0f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-4.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, -2.0f);
            b = new Complex32(2.0f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 8.388606e6f), 15);;
            a = new Complex32(2.0f, 8.388608e6f);
            b = new Complex32(2.0f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(4.0f, 0.0f), 15);;
            a = new Complex32(2.0f, -8.388608e6f);
            b = new Complex32(-2.0f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, 8.388608e6f);
            b = new Complex32(-2.0f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-4.0f, 0.0f), 15);;
            a = new Complex32(-2.0f, -8.388608e6f);
            b = new Complex32(8.388608e6f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(8.388606e6f, -8.388608e6f), 15);;
            a = new Complex32(8.388608e6f, 0.0f);
            b = new Complex32(-8.388608e6f, 0.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, 0.0f);
            b = new Complex32(8.388608e6f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.19209289550780998537e-7f), 15);;
            a = new Complex32(8.388608e6f, 1.19209289550780998537e-7f);
            b = new Complex32(8.388608e6f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.6777216e7f, 0.0f), 15);;
            a = new Complex32(8.388608e6f, -1.19209289550780998537e-7f);
            b = new Complex32(-8.388608e6f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, 1.19209289550780998537e-7f);
            b = new Complex32(-8.388608e6f, -1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.6777216e7f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, -1.19209289550780998537e-7f);
            b = new Complex32(8.388608e6f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 4.99999880790710449219e-1f), 15);;
            a = new Complex32(8.388608e6f, 5.0e-1f);
            b = new Complex32(8.388608e6f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.6777216e7f, 0.0f), 15);;
            a = new Complex32(8.388608e6f, -5.0e-1f);
            b = new Complex32(-8.388608e6f, 5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, 5.0e-1f);
            b = new Complex32(-8.388608e6f, -5.0e-1f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.6777216e7f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, -5.0e-1f);
            b = new Complex32(8.388608e6f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 5.0e-1f), 15);;
            a = new Complex32(8.388608e6f, 1.0f);
            b = new Complex32(8.388608e6f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.6777216e7f, 0.0f), 15);;
            a = new Complex32(8.388608e6f, -1.0f);
            b = new Complex32(-8.388608e6f, 1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, 1.0f);
            b = new Complex32(-8.388608e6f, -1.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.6777216e7f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, -1.0f);
            b = new Complex32(8.388608e6f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 1.0f), 15);;
            a = new Complex32(8.388608e6f, 2.0f);
            b = new Complex32(8.388608e6f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.6777216e7f, 0.0f), 15);;
            a = new Complex32(8.388608e6f, -2.0f);
            b = new Complex32(-8.388608e6f, 2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, 2.0f);
            b = new Complex32(-8.388608e6f, -2.0f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.6777216e7f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, -2.0f);
            b = new Complex32(8.388608e6f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 8.388606e6f), 15);;
            a = new Complex32(8.388608e6f, 8.388608e6f);
            b = new Complex32(8.388608e6f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(1.6777216e7f, 0.0f), 15);;
            a = new Complex32(8.388608e6f, -8.388608e6f);
            b = new Complex32(-8.388608e6f, 8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(0.0f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, 8.388608e6f);
            b = new Complex32(-8.388608e6f, -8.388608e6f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-1.6777216e7f, 0.0f), 15);;
            a = new Complex32(-8.388608e6f, -8.388608e6f);
            b = new Complex32(0.0f, 1.19209289550780998537e-7f);
            TestHelper.TestSignificantDigits(a + b, new Complex32(-8.388608e6f, -8.38860799999988079071e6f), 15);;
        }
    }
}